﻿<!DOCTYPE html>
<html>
  <head>
    <title>Tradingsystemview</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="resources/css/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="files/tradingsystemview/styles.css" type="text/css" rel="stylesheet"/>
    <script src="resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <script src="resources/scripts/prototypePre.js"></script>
    <script src="data/document.js"></script>
    <script src="resources/scripts/prototypePost.js"></script>
    <script src="files/tradingsystemview/data.js"></script>
    <link rel="stylesheet" type="text/css" href="./css/themes/default/easyui.css">
  <link rel="stylesheet" type="text/css" href="./css/themes/icon.css">
  <link rel="stylesheet" type="text/css" href="./css/component.css" />
  <script src="./js/jquery.min.js" type="text/javascript"></script>
  <script src="./js/jquery.easyui.min.js"></script>
  <script type="text/javascript">
    $axure.utils.getTransparentGifPath = function () { return 'resources/images/transparent.gif'; };
    $axure.utils.getOtherPath = function () { return 'resources/Other.html'; };
    $axure.utils.getReloadPath = function () { return 'resources/reload.html'; };
  </script>
</head>

<body>
  <!-- 页面div元素显示位置设置 -->
  <div id="base" class="" style="text-align:center;position:absolute;margin:30px;">



    <table id="dg" class="easyui-datagrid" title="交易系统信息查看" style="width:1122px;height:auto;" data-options="singleSelect:true,collapsible:false,url:'/BackstageOrder/showOrder',method:'get',pagination:true,rownumbers: false,iconCls:'icon-edit',toolbar:'',onClickRow: onClickRow">
      <thead>
        <tr>
          <th data-options="field:'orderId',width:80">订单编号</th>
          <th data-options="field:'orderUserId1',width:80">用户1id</th>
          <th data-options="field:'orderUserId2',width:80">用户2id</th>
          <th data-options="field:'orderCommodityId1',width:80">商品1id</th>
          <th data-options="field:'orderCommodityId2',width:80">商品2id</th>
          <th data-options="field:'orderCommodityId3',width:80">商品3id</th>
          <th data-options="field:'orderCommodityId4',width:80">商品4id</th>
          <th data-options="field:'orderCommodityThumbnail',width:90">商品缩略图1</th>
          <th data-options="field:'orderCommodityThumbnail2',width:90">商品缩略图2</th>
          <th data-options="field:'orderEvaluate',width:150">商品评论</th>
          <th data-options="field:'orderGenerationTime',width:150">订单生成时间</th>
          <th data-options="field:'orderState',width:80">订单状态</th>
        </tr>
      </thead>
    </table>
    <script type="text/javascript">
      function formatter1(value, row,index){
        if (row.userState == 0) { 
         return "未通过"; 
        } else if (row.userState == 1) {
          return "已通过";
        } else if (row.userState == 2) { 
          return "已冻结"; 
        } 
      }
      var editIndex = undefined;
      function endEditing() {
        if (editIndex == undefined) { return true }
        if ($('#dg').datagrid('validateRow', editIndex)) {
          $('#dg').datagrid('endEdit', editIndex);
          editIndex = undefined;
          return true;
        } else {
          return false;
        }
      }
      function onClickRow(index) {
        if (editIndex != index) {
          if (endEditing()) {
            $('#dg').datagrid('selectRow', index)
              .datagrid('beginEdit', index);
            editIndex = index;
          } else {
            $('#dg').datagrid('selectRow', editIndex);
          }
        }
      }
      function ww4(date) {
        var y = date.getFullYear();
        var m = date.getMonth() + 1;
        var d = date.getDate();
        return y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);

      }
      function w4(s) {
        var reg = '-'; //利用正则表达式分隔  
        var ss = (s.split(reg));
        var y = parseInt(ss[0], 10);
        var m = parseInt(ss[1], 10);
        var d = parseInt(ss[2], 10);
        if (!isNaN(y) && !isNaN(m) && !isNaN(d)) {
          return new Date(y, m - 1, d);
        } else {
          return new Date();
        }
      }  
    </script>
    </div>
  </body>
</html>
